import { ResPage, User } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

// ? 系统全局字典

// /**
//  * @description：承包商
//  */
// export const genderType = [
//   { genderLabel: "男", genderValue: 1 },
//   { genderLabel: "女", genderValue: 2 }
// ];

/**
 * @description：承包商
 */
// 获取用户性别字典
// export const genderType = localStorage.getItem("genderType") ? JSON.parse(localStorage.getItem("genderType") as string) : [];
// export const kaihuType = localStorage.getItem("kaihuType") ? JSON.parse(localStorage.getItem("kaihuType") as string) : [];
export const getGenderType = () => {
  return localStorage.getItem("genderType") ? JSON.parse(localStorage.getItem("genderType") as string) : [];
};

export const getKaihuType = () => {
  return localStorage.getItem("kaihuType") ? JSON.parse(localStorage.getItem("kaihuType") as string) : [];
};
// export const genderType = async () => {
//   return http.get<User.ResGender[]>(PORT1 + `/user/gender`);
// };

// export const genderType = [
//   { genderLabel: "上海联捷电气有限公司", genderValue: 1 },
//   { genderLabel: "吉林省杰立电子技术有限公司", genderValue: 2 }
//   // { genderLabel: "上海涨达电子科技有限公司", genderValue: 3 }
// ];
/**
 * @description：开户行
 */
// export const kaihuType = [
//   { genderLabel: "中国农业银行股份有限公司上海浦东大道支行", genderValue: 1 },
//   { genderLabel: "中国建设银行股份有限公司蛟河支行", genderValue: 2 }
// ];

/**
 * @description：用户状态
 */
export const userStatus = [
  { label: "启用", value: 1, tagType: "success" },
  { label: "禁用", value: 0, tagType: "danger" }
];
